home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows 6-Pak - Disc 4
/
Windows 6-Pak (InfoMagic) (Disc 4) (1999).ISO
/
Text-Chat-Scripts
/
pp-320m.exe
/
pp300
/
a-main1.mrc
< prev
next >
Wrap
Text File
|
1998-10-10
|
28KB
|
634 lines
; -----------------------------------------------------
; Peace and Protection (by misspai)
; -----------------------------------------------------
; Main (normal) aliases
; (First section)
; -----------------------------------------------------
; Kicking and banning
; -----------------------------------------------------
kick {
_psplit kk $1-
if (%.kk.nick == $null) _quickhelp /kick
if ($_ismask(%.kk.nick)) { fk $1- | return }
if (%+nick.complete.cmd) {
set %.kk.comp $_nickcomp(%.kk.nick,%.kk.chan)
if (%.kk.comp != $null) set %.kk.nick %.kk.comp
}
if (%.kk.msg == $null) set %.kk.msg $_kickmsg(%.kk.chan,%.kk.nick)
else set %.kk.msg $_kickwrap(%.kk.chan,%.kk.nick,%.kk.msg)
_usexw %.kk.chan kick kick
if (%.xw != $null) {
dispr %.kk.chan Using %col.target $+ %.xw $+ to kick %col.target $+ %.kk.nick $+ ...
if (%.xw isin X.W) _privmsg %.xw kick %.kk.chan %.kk.nick %.kk.msg
elseif (%.xw == ChanServ) _error You cannot use ChanServ to simply kick users.
else _botcmd %.xw %.kk.chan %.kk.nick %.kk.msg
}
else {
if ($_ismask(%.kk.nick)) fk $1-
else .raw kick %.kk.chan %.kk.nick : $+ %.kk.msg
}
}
k kick $1-
kb set %.kk.type 3 | set %.kk.cmd /kb | _ppkb $1-
kb2 set %.kk.type 4 | set %.kk.cmd /kb2 | _ppkb $1-
kb0 set %.kk.type 2 | set %.kk.cmd /kb0 | _ppkb $1-
bk kb $1-
bk2 kb2 $1-
bk0 kb0 $1-
_ppkb {
if ($left($1,2) == -u) { _psplit kk $2- | set %.kk.time $remove($1,-u) }
else { _psplit kk $1- | set %.kk.time 0 }
if (%.kk.nick == $null) _quickhelp %.kk.cmd
if ($_ismask(%.kk.nick)) { cb $1- | halt }
if (%+nick.complete.cmd) {
set %.kk.comp $_nickcomp(%.kk.nick,%.kk.chan)
if (%.kk.comp != $null) set %.kk.nick %.kk.comp
}
if (%.kk.time > 0) {
if (%.kk.msg == $null) set %.kk.msg $_tkickmsg(%.kk.chan,%.kk.nick,%.kk.time)
else set %.kk.msg $_tkickwrap(%.kk.chan,%.kk.nick,%.kk.time,%.kk.msg)
}
else {
if (%.kk.msg == $null) set %.kk.msg $_kickmsg(%.kk.chan,%.kk.nick)
else set %.kk.msg $_kickwrap(%.kk.chan,%.kk.nick,%.kk.msg)
}
set %.kk.myself $me $+ ! $+ %-my.address
set %.kk.mask $_ppmask(%.kk.nick,%.kk.type)
if (%.kk.mask iswm %.kk.myself) set %.kk.mask $_ppmask(%.kk.nick,1)
_usexw %.kk.chan kickban ban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.kk.chan Using %col.target $+ ChanServ to add %col.target $+ %.kk.nick $+ to akick list...
cs akick %.kk.chan add %.kk.mask
}
else {
dispr %.kk.chan Using %col.target $+ %.xw $+ to kickban %col.target $+ %.kk.nick $+ ...
if (%.xw isin X.W) _privmsg %.xw ban %.kk.chan %.kk.mask 168 75 %.kk.msg
else _botcmd %.xw %.kk.chan %.kk.mask %.kk.msg
}
}
else {
.raw mode %.kk.chan -o+b %.kk.nick %.kk.mask
.raw kick %.kk.chan %.kk.nick : $+ %.kk.msg
}
if (%.kk.time > 0) tunban %.kk.time %.kk.chan %.kk.mask
set %_recent.ban. [ $+ [ %.kk.chan ] ] %.kk.mask
}
tempban set %.kk.type 2 | set %.kk.cmd /tempban | _ppkb -u20 $1-
tempkb tempban $1-
tempbk tempban $1-
kbtemp tempban $1-
bktemp tempban $1-
bantemp tempban $1-
ban {
if ($left($1,2) == -u) { _psplit bb $2- | set %.bb.time $remove($1,-u) }
else { _psplit bb $1- | set %.bb.time 0 }
if ($gettok(%.bb.msg,1,32) isnum) { set %.bb.lvl $gettok(%.bb.msg,1,32) | set %.bb.msg $gettok(%.bb.msg,2-,32) }
else set %.bb.lvl 3
if (%.bb.nick == $null) .raw mode %.bb.chan +b
else {
if ($_ismask(%.bb.nick) == $false) {
if (%+nick.complete.cmd) set %.bb.comp $_nickcomp(%.bb.nick,%.bb.chan)
else unset %.bb.comp
if (%.bb.comp == $null) set %.bb.comp %.bb.nick
if ($address(%.bb.comp,5) == $null) _lookup %.bb.comp %.bb.lvl ban -u $+ %.bb.time %.bb.chan , %.bb.msg
set %.bb.nick $_ppmask(%.bb.comp,%.bb.lvl)
}
set %.bb.myself $me $+ ! $+ %-my.address
if (%.bb.nick iswm %.bb.myself) { dispr %.bb.chan Ban of %col.target $+ %.bb.nick $+ aborted- address matches yours! | return }
_usexw %.bb.chan ban ban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.bb.chan Using %col.target $+ ChanServ to add %col.target $+ %.bb.nick $+ to akick list...
cs akick %.bb.chan add %.bb.nick
}
else {
dispr %.bb.chan Using %col.target $+ %.xw $+ to ban %col.target $+ %.bb.nick $+ ...
if (%.xw isin X.W) _privmsg %.xw ban %.bb.chan %.bb.nick 336 75 %.bb.msg
else _botcmd %.xw %.bb.chan %.bb.nick %.bb.msg
}
}
else {
fdop %.bb.chan %.bb.nick
.raw mode %.bb.chan +b %.bb.nick
}
if (%.bb.time > 0) tunban %.bb.time %.bb.chan %.bb.nick
set %_recent.ban. [ $+ [ %.bb.chan ] ] %.bb.nick
}
}
banlast {
if ($left($1,2) == -u) { _psplit bb $2- | set %.bb.time $1 }
else { _psplit bb $1- | unset %.bb.time }
if (%.bb.nick isnum) set %.bb.lvl %.bb.nick
else { set %.bb.lvl 3 | set %.bb.msg %.bb.param }
set %.bb.nick %-recent.part. [ $+ [ %.bb.chan ] ]
if (%.bb.nick == $null) _error Nobody has parted for you to ban.
ban %.bb.time %.bb.chan $_ppmask(%.bb.nick,%.bb.lvl) %.bb.msg
}
lastban banlast $1-
tunban set %.tunban $3 $+ $2 | .timerTempBan [ $+ [ $replace($replace(%.tunban,*,&),?,+) ] ] 1 $1 aunban $2 $3
tunban2 set %.tunban $3 $+ $2 | .timerAutoUnban [ $+ [ $replace($replace(%.tunban,*,&),?,+) ] ] 1 $1 aunban $2 $3
aunban if ($me !isop $1) disprs $1 [[ $+ %col.info1 $+ $1 $+ ] Automatic unban of %col.target $+ $2 $+ aborted. (You are not op.) | else .raw mode $1 -b $2
unban {
_psplit ub $1-
if (%.ub.nick == $null) set %.ub.nick %_recent.ban. [ $+ [ %.ub.chan ] ]
if (%.ub.nick == $null) _error No ban given to unban, and no recent bans known.
if ($gettok(%.ub.msg,1,32) isnum) { set %.ub.lvl $gettok(%.ub.msg,1,32) | set %.ub.msg $gettok(%.ub.msg,2-,32) }
else set %.ub.lvl 3
if ($_ismask(%.ub.nick) == $false) {
set %.ub.nick $_nickglob(%.ub.nick)
if ($address(%.ub.nick,5) == $null) _lookup %.ub.nick %.ub.lvl unban %.ub.chan , %.ub.msg
set %.ub.nick $_ppmask(%.ub.nick,%.ub.lvl)
}
_usexw %.ub.chan unban unban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.ub.chan Using %col.target $+ ChanServ to remove %col.target $+ %.ub.nick $+ from akick list...
cs akick %.ub.chan del %.ub.nick
}
else {
dispr %.ub.chan Using %col.target $+ %.xw $+ to unban %col.target $+ %.ub.nick $+ ...
if (%.xw isin X.W) _privmsg %.xw unban %.ub.chan %.ub.nick 336 75 %.ub.msg
else _botcmd %.xw %.ub.chan %.ub.nick %.ub.msg
}
}
else _massmode %.ub.chan -b %.ub.nick %.ub.msg
set %_recent.unban. [ $+ [ %.ub.chan ] ] %.ub.nick
}
reban {
_psplit ub $1-
set %.ub.nick %_recent.unban. [ $+ [ %.ub.chan ] ]
if (%.ub.nick == $null) _error No recent unbans known, for rebanning.
_usexw %.ub.chan reban ban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.ub.chan Using %col.target $+ ChanServ to add %col.target $+ %.ub.nick $+ to akick list...
cs akick %.ub.chan add %.ub.nick
}
else {
dispr %.ub.chan Using %col.target $+ %.xw $+ to ban %col.target $+ %.ub.nick $+ ...
if (%.xw isin X.W) _privmsg %.xw ban %.ub.chan %.ub.nick
else _botcmd %.xw %.ub.chan %.ub.nick
}
}
else .raw mode %.ub.chan +b %.ub.nick
set %_recent.ban. [ $+ [ %.ub.chan ] ] %.ub.nick
}
cb {
if ($left($1,2) == -u) { _psplit bb $2- | set %.bb.time $remove($1,-u) }
else { _psplit bb $1- | set %.bb.time 0 }
if (%.bb.nick == $null) _quickhelp /cb
if ($_ismask(%.bb.nick)) {
if ($ialchan(%.bb.nick,%.bb.chan,0) == 0) return
_usexw %.bb.chan kickban ban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.bb.chan Using %col.target $+ ChanServ to add %col.target $+ %.bb.nick $+ to akick list...
cs akick %.bb.chan add %.bb.nick
}
else {
dispr %.bb.chan Using %col.target $+ %.xw $+ to kickban %col.target $+ %.bb.nick $+ ...
if (%.bb.msg == $null) set %.bb.msg $_kickmsg(%.bb.chan,%.bb.nick)
if (%.xw isin X.W) _privmsg %.xw ban %.bb.chan %.bb.nick 168 75 $_kickwrap(%.bb.chan,%.bb.nick,%.bb.msg)
else _botcmd %.xw %.bb.chan %.bb.nick $_kickwrap(%.bb.chan,%.bb.nick,%.bb.msg)
}
}
else {
fdop %.bb.chan %.bb.nick
.raw mode %.bb.chan +b %.bb.nick
fk %.bb.chan %.bb.nick %.bb.msg
}
}
else {
if (%+nick.complete.cmd) {
set %.bb.comp $_nickcomp(%.bb.nick,%.bb.chan)
if (%.bb.comp != $null) set %.bb.nick %.bb.comp
}
if ($address(%.bb.nick,5) == $null) _error No one to ban (address of user $+ %.bb.nick $+ unknown)
set %.bb.dynip $_ppmask(%.bb.nick,2)
set %.bb.identd $_ppmask(%.bb.nick,3)
set %.bb.myself $me $+ ! $+ %-my.address
if (($ialchan(%.bb.identd,%.bb.chan,0) >= $ialchan(%.bb.dynip,%.bb.chan,0)) && (%.bb.identd !iswm %.bb.myself)) set %.bb.nick %.bb.identd
else set %.bb.nick %.bb.dynip
_usexw %.bb.chan kickban ban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.bb.chan Using %col.target $+ ChanServ to add %col.target $+ %.bb.nick $+ to akick list...
cs akick %.bb.chan add %.bb.nick
}
else {
dispr %.bb.chan Using %col.target $+ %.xw $+ to kickban %col.target $+ %.bb.nick $+ ...
if (%.bb.msg == $null) set %.bb.msg $_kickmsg(%.bb.chan,%.bb.nick)
if (%.xw isin X.W) _privmsg %.xw ban %.bb.chan %.bb.nick 168 75 $_kickwrap(%.bb.chan,%.bb.nick,%.bb.msg)
else _botcmd %.xw %.bb.chan %.bb.nick $_kickwrap(%.bb.chan,%.bb.nick,%.bb.msg)
}
}
else {
fdop %.bb.chan %.bb.nick
.raw mode %.bb.chan +b %.bb.nick
fk %.bb.chan %.bb.nick %.bb.msg
}
}
if (%.bb.time > 0) tunban %.bb.time %.bb.chan %.bb.nick
set %_recent.ban. [ $+ [ %.bb.chan ] ] %.bb.nick
}
cb2 set %.kk.type 4 | set %.kk.cmd /cb2 | _ppcb $1-
cb0 set %.kk.type 2 | set %.kk.cmd /cb0 | _ppcb $1-
_ppcb {
if ($left($1,2) == -u) { _psplit bb $2- | set %.bb.time $remove($1,-u) }
else { _psplit bb $1- | set %.bb.time 0 }
if (%.bb.nick == $null) _quickhelp %.kk.cmd
if ($_ismask(%.bb.nick)) cb $1-
else {
if (%+nick.complete.cmd) {
set %.bb.comp $_nickcomp(%.bb.nick,%.bb.chan)
if (%.bb.comp != $null) set %.bb.nick %.bb.comp
}
if ($address(%.bb.nick,5) == $null) _error No one to ban (address of user $+ %.bb.nick $+ unknown)
set %.bb.nick $_ppmask(%.bb.nick,%.kk.type)
set %_recent.ban. [ $+ [ %.bb.chan ] ] %.bb.nick
_usexw %.bb.chan kickban ban
if (%.xw != $null) {
if (%.xw == ChanServ) {
dispr %.bb.chan Using %col.target $+ ChanServ to add %col.target $+ %.bb.nick $+ to akick list...
cs akick %.bb.chan add %.bb.nick
}
else {
dispr %.bb.chan Using %col.target $+ %.xw $+ to kickban %col.target $+ %.bb.nick $+ ...
if (%.bb.msg == $null) set %.bb.msg $_kickmsg(%.bb.chan,%.bb.nick)
if (%.xw isin X.W) _privmsg %.xw ban %.bb.chan %.bb.nick 168 75 $_kickwrap(%.bb.chan,%.bb.nick,%.bb.msg)
else _botcmd %.xw %.bb.chan %.bb.nick $_kickwrap(%.bb.chan,%.bb.nick,%.bb.msg)
}
}
else {
fdop %.bb.chan %.bb.nick
.raw mode %.bb.chan +b %.bb.nick
fk %.bb.chan %.bb.nick %.bb.msg
}
}
if (%.bb.time > 0) tunban %.bb.time %.bb.chan %.bb.nick
set %_recent.ban. [ $+ [ %.bb.chan ] ] %.bb.nick
}
bc cb $1-
bc2 cb2 $1-
bc0 cb0 $1-
fk {
_psplit fk $1-
if (%.fk.nick == $null) _quickhelp /fk
if ($_not($_ismask(%.fk.nick))) {
if (%.fk.nick !ison %.fk.chan) set %.fk.nick * $+ %.fk.nick $+ *
else set %.fk.nick $_ppmask(%.fk.nick,2)
}
_usexw %.fk.chan filterkick kick
set %.fk.num $ialchan(%.fk.nick,%.fk.chan,0)
if (%.fk.num == 0) _error No one found to kick (matching the mask of $+ %.fk.nick $+ )
if (%.xw != $null) {
dispr %.fk.chan Using %col.target $+ %.xw $+ to kick %col.target $+ %.fk.nick $+ ...
if (%.fk.msg == $null) set %.fk.msg $_kickmsg(%.fk.chan,%.fk.nick)
else set %.fk.msg $_kickwrap(%.fk.chan,%.fk.nick,%.fk.msg)
if (%.xw isin X.W) _privmsg %.xw kick %.fk.chan %.fk.nick %.fk.msg
elseif (%.xw == ChanServ) _error You cannot use ChanServ to simply kick users.
else _botcmd %.xw %.fk.chan %.fk.nick %.fk.msg
}
else {
:loop
set %.fk.who $ialchan(%.fk.nick,%.fk.chan,%.fk.num).nick
if (%.fk.who != $me) {
if (%.fk.msg == $null) .raw kick %.fk.chan %.fk.who : $+ $_kickmsg(%.fk.chan,%.fk.nick)
else .raw kick %.fk.chan %.fk.who : $+ $_kickwrap(%.fk.chan,%.fk.nick,%.fk.msg)
}
if ($_vd(.fk.num) > 0) goto loop
}
}
fknop {
_psplit fk $1-
if (%.fk.nick == $null) _quickhelp /fknop
if ($_not($_ismask(%.fk.nick))) {
if (%.fk.nick !ison %.fk.chan) set %.fk.nick * $+ %.fk.nick $+ *
else set %.fk.nick $_ppmask(%.fk.nick,2)
}
if ($me !isop %.fk.chan) _needops2 %.fk.chan filterkick non-ops
else {
set %.fk.num $ialchan(%.fk.nick,%.fk.chan,0)
if (%.fk.num == 0) return
:loop
set %.fk.who $ialchan(%.fk.nick,%.fk.chan,%.fk.num).nick
if (%.fk.who !isop %.fk.chan) {
if (%.fk.msg == $null) .raw kick %.fk.chan %.fk.who : $+ $_kickmsg(%.fk.chan,%.fk.nick)
else .raw kick %.fk.chan %.fk.who : $+ $_kickwrap(%.fk.chan,%.fk.nick,%.fk.msg)
}
if ($_vd(.fk.num) > 0) goto loop
}
}
fban {
_psplit fb $1-
if (%.fb.nick == $null) _quickhelp /fban
if ($me !isop %.fb.chan) _needops2 %.fb.chan filterban
if (* !isin %.fb.nick) set %.fb.nick * $+ %.fb.nick $+ *
set %.fb.param $_getnicks(%.fb.chan,%.fb.nick,xwnot)
set %.fb.num $_numtok(32,%.fb.param)
unset %.fb.toban %.fb.todeop
:loop
set %.fb.nick $gettok(%.fb.param,%.fb.num,32)
if (%.fb.nick isop %.fb.chan) set %.fb.todeop %.fb.todeop %.fb.nick
set %.fb.dynip $_ppmask(%.fb.nick,2)
set %.fb.identd $_ppmask(%.fb.nick,3)
if ($ialchan(%.fb.identd,%.fb.chan,0) >= $ialchan(%.fb.dynip,%.fb.chan,0)) set %.fb.dynip %.fb.identd
set %.fb.toban %.fb.toban %.fb.identd
if ($_vd(.fb.num) > 0) goto loop
_massmode %.fb.chan -o %.fb.todeop
_massmode %.fb.chan +b %.fb.toban
}
; -----------------------------------------------------
; An easy way of sending warning
; via notice. (for automated kicks)
; Must use in a chan or give a chan
; for looking up nicks and stuff.
; -----------------------------------------------------
warn {
_psplit kk $1-
if (%.kk.msg == $null) _quickhelp /warn
if ($_ismask(%.kk.nick)) set %.kk.nick $ialchan(%.kk.nick,%.kk.chan,1)
if (%.kk.nick == $null) return
if (%-warned. [ $+ [ %.kk.nick ] ] > 0) return
_timersinc 20 -warned. $+ %.kk.nick
_qnotice %.kk.nick (on %.kk.chan $+ ) %.kk.msg
dispr %.kk.chan [[ $+ %col.info1 $+ %.kk.chan $+ ] Warning sent to %col.target $+ %.kk.nick $+ - " $+ %.kk.msg $+ "
}
; -----------------------------------------------------
; Opping, deopping, voicing, and
; devoicing
; -----------------------------------------------------
opme op $1- $me
op {
_psplit op $1-
if (%.op.nick == $null) _quickhelp /op
if ($_ismask(%.op.nick)) fop $1-
else {
if (%.op.param == $me) _usexw %.op.chan giveops opme
else _usexw %.op.chan giveops op
if (%.xw == $null) _massmode %.op.chan +o $_c2s(%.op.param)
else {
dispr %.op.chan Using %col.target $+ %.xw $+ to op %col.target $+ %.op.param $+ ...
if (%.xw isin X.W) _privmsg %.xw op %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
elseif (%.xw == ChanServ) cs op %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
else _botcmd %.xw %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
}
}
}
dopme dop $1- $me
dop {
_psplit op $1-
if (%.op.nick == $null) _quickhelp /dop
if ($_ismask(%.op.nick)) fdop $1-
else {
_usexw %.op.chan takeops deop
if (%.xw == $null) _massmode %.op.chan -o $_c2s(%.op.param)
else {
dispr %.op.chan Using %col.target $+ %.xw $+ to deop %col.target $+ %.op.param $+ ...
if (%.xw isin X.W) _privmsg %.xw deop %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
elseif (%.xw == ChanServ) cs op %.op.chan - $+ $_s2sd($_nickcseries(32,%.op.chan,$_c2s(%.op.param)))
else _botcmd %.xw %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
}
}
}
deop dop $1-
voc _psplit op $1- | if (%.op.nick == $null) _quickhelp /voc | if ($me !isop %.op.chan) _needops2 %.op.chan voice people | if ($_ismask(%.op.nick)) fvoc $1- | else _massmode %.op.chan +v $_c2s(%.op.param)
dvoc _psplit op $1- | if (%.op.nick == $null) _quickhelp /dvoc | if ($me !isop %.op.chan) _needops2 %.op.chan devoice people | if ($_ismask(%.op.nick)) fdvoc $1- | else _massmode %.op.chan -v $_c2s(%.op.param)
v voc $1-
dv dvoc $1-
dev dvoc $1-
devoc dvoc $1-
fop {
_psplit op $1-
if (%.op.nick == $null) _quickhelp /fop
if (* !isin %.op.nick) set %.op.nick * $+ %.op.nick $+ *
set %.op.param $_getnicks(%.op.chan,%.op.nick,-o)
_usexw %.op.chan give ops
if (%.xw == $null) _massmode %.op.chan +o %.op.param
else {
dispr %.op.chan Using %col.target $+ %.xw $+ to op %col.target $+ %.op.param $+ ...
if (%.xw isin X.W) _privmsg %.xw op %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
elseif (%.xw == ChanServ) cs op %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
else _botcmd %.xw %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
}
}
fdop {
_psplit op $1-
if (%.op.nick == $null) _quickhelp /fdop
if (* !isin %.op.nick) set %.op.nick * $+ %.op.nick $+ *
set %.op.param $_getnicks(%.op.chan,%.op.nick,xwnot,+o)
_usexw %.op.chan take ops
if (%.xw == $null) _massmode %.op.chan -o %.op.param
else {
dispr %.op.chan Using %col.target $+ %.xw $+ to deop %col.target $+ %.op.param $+ ...
if (%.xw isin X.W) _privmsg %.xw deop %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
elseif (%.xw == ChanServ) cs op %.op.chan - $+ $_s2sd($_nickcseries(32,%.op.chan,$_c2s(%.op.param)))
else _botcmd %.xw %.op.chan $_nickcseries(32,%.op.chan,$_c2s(%.op.param))
}
}
fdeop fdop $1-
fvoc _psplit op $1- | if (%.op.nick == $null) _quickhelp /fvoc | if ($me !isop %.op.chan) _needops2 %.op.chan voice people | if (* !isin %.op.nick) set %.op.nick * $+ %.op.nick $+ * | _massmode %.op.chan +v $_getnicks(%.op.chan,%.op.nick,xw)
fdvoc _psplit op $1- | if (%.op.nick == $null) _quickhelp /fdvoc | if ($me !isop %.op.chan) _needops2 %.op.chan devoice people | if (* !isin %.op.nick) set %.op.nick * $+ %.op.nick $+ * | _massmode %.op.chan -v $_getnicks(%.op.chan,%.op.nick,xw)
fv fvoc $1-
fdv fdvoc $1-
fdev fdvoc $1-
fdevoc fdvoc $1-
; -----------------------------------------------------
; Bot-control (X/W, etc.)
; -----------------------------------------------------
ch x $1-
x {
if (($2 == $null) && ($1 != opme) && ($1 != dopme) && ($1 != unban) && ($1 != reban) && ($1 != banlast)) _quickhelp /x
set %.+usexw $true
$1-
unset %.+usexw
}
xmsg if (($chan($active) != $active) || ($_ischan($2)) || ($1 == help) || ($1 == verify) || ($1 == search)) msg x@channels.undernet.org $1- | else msg x@channels.undernet.org $1 $active $2-
wmsg if (($chan($active) != $active) || ($_ischan($2)) || ($1 == help) || ($1 == verify) || ($1 == search)) msg w@channels2.undernet.org $1- | else msg w@channels2.undernet.org $1 $active $2-
cmsg if (($chan($active) != $active) || ($_ischan($2)) || ($1 == help) || ($1 == list)) cs $1- | else cs $1 $active $2-
csmsg cmsg $1-
bot {
if (($2 == $null) && ($1 != opme)) _quickhelp /bot
set %.+usebot $true
$1-
unset %.+usebot
}
cs if (%pp.net == dalnet) _privmsg chanserv@services.dal.net $1- | else _privmsg chanserv $1-
ns if (%pp.net == dalnet) _privmsg nickserv@services.dal.net $1- | else _privmsg nickserv $1-
ms if (%pp.net == dalnet) _privmsg memoserv@services.dal.net $1- | else _privmsg memoserv $1-
; -----------------------------------------------------
; Mass messages (mass notices
; such as wallops, and messages
; to all chats/channels/etc.)
; -----------------------------------------------------
aame if ($1 == $null) _quickhelp /aame | acme $1- | if (($chan(0) > 0) && ($server != $null)) ame $1-
aamsg if ($1 == $null) _quickhelp /aamsg | acmsg $1- | if (($chan(0) > 0) && ($server != $null)) amsg $1-
acme {
if ($1 == $null) _quickhelp /acme
set %.aa.num $chat(0)
if (%.aa.num < 1) return
:loop
if ($chat(%.aa.num).status == active) describe = $+ $chat(%.aa.num) $1-
if ($_vd(.aa.num) > 0) goto loop
}
acmsg {
if ($1 == $null) _quickhelp /acme
set %.aa.num $chat(0)
if (%.aa.num < 1) return
:loop
if ($chat(%.aa.num).status == active) msg = $+ $chat(%.aa.num) $1-
if ($_vd(.aa.num) > 0) goto loop
}
wall {
_psplit mn $1-
if (%.mn.param == $null) _quickhelp /wall
if ($len(%.mn.param) > 300) _error You must enter a message under 300 characters for mass notices.
set %.mn.send $_opmsg(%.mn.chan,%.mn.param)
echo $colour(own) -i2 %.mn.chan -> %.mn.send
if (%+wallopbyuserlist) {
unset %.mn.to
set %.mn.num $opnick(%.mn.chan,0)
if (%.mn.num != 0) {
:loop1
set %.mn.nick $opnick(%.mn.chan,%.mn.num)
if (%.mn.nick != $me) {
if (op isin $level($address(%.mn.nick,5))) {
set %.mn.ops %opchan. [ $+ [ $maddress($address(%.mn.nick,5)) ] ]
if ($findtok(%.mn.ops,%.mn.chan,32) != $null) {
set %.mn.to %.mn.to %.mn.nick
if ($calc($len(%.mn.to) + $len(%.mn.send)) > 450) { _qnotice $_s2c(%.mn.to) %.mn.send | unset %.mn.to }
}
}
}
if ($_vd(.mn.num) > 0) goto loop1
if (%.mn.to != $null) _qnotice $_s2c(%.mn.to) %.mn.send
}
}
if ((%pp.net == undernet) || (%pp.net == dalnet)) { .raw notice @ $+ %.mn.chan : $+ %.mn.send | return }
unset %.mn.to
set %.mn.num $opnick(%.mn.chan,0)
if (%.mn.num == 0) return
:loop2
set %.mn.nick $opnick(%.mn.chan,%.mn.num)
if (%.mn.nick != $me) set %.mn.to %.mn.to %.mn.nick
if ($calc($len( [ %.mn.to ] ) + $len(%.mn.send)) > 450) { _qnotice $_s2c(%.mn.to) %.mn.send | unset %.mn.to }
if ($_vd(.mn.num) > 0) goto loop2
if (%.mn.to != $null) _qnotice $_s2c(%.mn.to) %.mn.send
}
o wall $1-
onotice wall $1-
wallvoc {
_psplit mn $1-
if (%.mn.param == $null) _quickhelp /wallvoc
if ($len(%.mn.param) > 300) _error You must enter a message under 300 characters for mass notices.
set %.mn.send $_vocmsg(%.mn.chan,%.mn.param)
echo $colour(own) -i2 %.mn.chan -> %.mn.send
if (%+wallopbyuserlist) {
unset %.mn.to
set %.mn.num $nopnick(%.mn.chan,0)
if (%.mn.num != 0) {
:loop1
set %.mn.nick $nopnick(%.mn.chan,%.mn.num)
if (%.mn.nick != $me) {
if (op isin $level($address(%.mn.nick,5))) {
set %.mn.ops %opchan. [ $+ [ $maddress($address(%.mn.nick,5)) ] ]
if ($findtok(%.mn.ops,%.mn.chan,32) != $null) {
set %.mn.to %.mn.to %.mn.nick
if ($calc($len(%.mn.to) + $len(%.mn.send)) > 450) { _qnotice $_s2c(%.mn.to) %.mn.send | unset %.mn.to }
}
}
}
if ($_vd(.mn.num) > 0) goto loop1
if (%.mn.to != $null) _qnotice $_s2c(%.mn.to) %.mn.send
}
}
unset %.mn.to
if ((%pp.net == undernet) || (%pp.net == dalnet)) .raw notice @ $+ %.mn.chan : $+ %.mn.send
else {
set %.mn.num $opnick(%.mn.chan,0)
if (%.mn.num > 0) {
:loop2
set %.mn.nick $opnick(%.mn.chan,%.mn.num)
if (%.mn.nick != $me) set %.mn.to %.mn.to %.mn.nick
if ($calc($len( [ %.mn.to ] ) + $len(%.mn.send)) > 450) { _qnotice $_s2c(%.mn.to) %.mn.send | unset %.mn.to }
if ($_vd(.mn.num) > 0) goto loop2
}
}
set %.mn.num $vnick(%.mn.chan,0)
if (%.mn.num > 0) {
:loop3
set %.mn.nick $vnick(%.mn.chan,%.mn.num)
if (%.mn.nick != $me) if (%.mn.nick !isop %.mn.chan) set %.mn.to %.mn.to %.mn.nick
if ($calc($len( [ %.mn.to ] ) + $len(%.mn.send)) > 450) { _qnotice $_s2c(%.mn.to) %.mn.send | unset %.mn.to }
if ($_vd(.mn.num) > 0) goto loop3
}
if (%.mn.to != $null) _qnotice $_s2c(%.mn.to) %.mn.send
}
ov wallvoc $1-
ovnotice wallvoc $1-
allbut {
_psplit mn $1-
if (%.mn.msg == $null) _quickhelp /allbut
if ($len(%.mn.msg) > 300) _error You must enter a message under 300 characters for mass notices.
set %.mn.nick $_nickseries(44,%.mn.nick)
set %.mn.send $_massmsg(AllBut,%.mn.chan,&allbut&,%.mn.nick,%.mn.msg)
set %.mn.num $_numtok(44,%.mn.nick)
:loop
if ($gettok(%.mn.nick,%.mn.num,44) !ison %.mn.chan) _error $+ $gettok(%.mn.nick,%.mn.num,44) $+ is not on %.mn.chan $+ !
if ($_vd(.mn.num) > 0) goto loop
echo $colour(own) -i2 %.mn.chan -> %.mn.send
unset %.mn.delay %.mn.to
set %.mn.num $nick(%.mn.chan,0)
:loop2
set %.mn.cur $nick(%.mn.chan,%.mn.num)
if (%.mn.cur != $me) if ($findtok(%.mn.nick,%.mn.cur,44) == $null) set %.mn.to %.mn.to %.mn.cur
if ($calc($len( [ %.mn.to ] ) + $len(%.mn.send)) > 450) { if (%.mn.delay == $null) _qnotice $_s2c(%.mn.to) %.mn.send | else .timer 1 %.mn.delay _qnotice $_s2c(%.mn.to) %.mn.send | inc %.mn.delay | unset %.mn.to }
if ($_vd(.mn.num) > 0) goto loop2
if (%.mn.to != $null) { if (%.mn.delay == $null) _qnotice $_s2c(%.mn.to) %.mn.send | else .timer 1 %.mn.delay _qnotice $_s2c(%.mn.to) %.mn.send }
}
massn {
_psplit mn $1-
if (%.mn.param == $null) _quickhelp /massn
if ($len(%.mn.param) > 300) _error You must enter a message under 300 characters for mass notices.
set %.mn.num $snick(%.mn.chan,0)
if (%.mn.num == 0) _error You must select some nicks in the nickname list, as users to send the message to.
if (%.mn.num == 1) { n $snick(%.mn.chan,1) %.mn.param | halt }
unset %.mn.delay %.mn.to
if (%.mn.num < 6) {
:loop | set %.mn.to %.mn.to $snick(%.mn.chan,%.mn.num) | if ($_vd(.mn.num) > 0) goto loop
set %.mn.to $_s2c(%.mn.to)
set %.mn.send $_privn(Mass1,&targets&,%.mn.to,%.mn.param)
_qnotice %.mn.to %.mn.send
}
else {
set %.mn.send $_privn(Mass2,&targets&,%.mn.num,%.mn.param)
:loop2
set %.mn.cur $snick(%.mn.chan,%.mn.num)
if (%.mn.cur != $me) set %.mn.to %.mn.to %.mn.cur
if ($calc($len(%.mn.to) + $len(%.mn.send)) > 450) { if (%.mn.delay == $null) disps _qnotice $_s2c(%.mn.to) %.mn.send | else disps .timer 1 %.mn.delay _qnotice $_s2c(%.mn.to) %.mn.send | inc %.mn.delay | unset %.mn.to }
if ($_vd(.mn.num) > 0) goto loop2
if (%.mn.to != $null) { if (%.mn.delay == $null) disps _qnotice $_s2c(%.mn.to) %.mn.send | else disps .timer 1 %.mn.delay _qnotice $_s2c(%.mn.to) %.mn.send }
}
echo $colour(own) -i2 # -> %.mn.send
}
; -----------------------------------------------------
; Repetition of most recent event
; or notice
; -----------------------------------------------------
ele if ($1 == $null) editbox -a /say $_stripout(%_last.disp) $+ | else editbox -a /msg $1 $_stripout(%_last.disp) $+
sle if ($1 == $null) editbox -a /say $strip(%_last.disp) | else editbox -a /msg $1 $strip(%_last.disp)
rle dispa %_last.disp
eln if ($1 == $null) editbox -a /say $+ %_last.notice.nick $+ %_last.notice | else editbox -a /msg $1 $+ %_last.notice.nick $+ %_last.notice
sln if ($1 == $null) editbox -a /say $+ %_last.notice.nick $+ $strip(%_last.notice) | else editbox -a /msg $1 $+ %_last.notice.nick $+ $strip(%_last.notice)
rln dispa $+ %_last.notice.nick $+ %_last.notice
mtn {
_psplit mm $replace($1-,+,)
if ($me !isop %.mm.chan) _needops2 %.mm.chan change the mode
set %.mm.chan $replace(%.mm.chan,,+)
set %.mm.mode $remove($remove($remove($gettok($chan(%.mm.chan).mode,1,32),+),t),n)
if (%pp.net == dalnet) set %.mm.mode $_caserem(%.mm.mode,r)
.raw mode %.mm.chan +tn- $+ %.mm.mode $chan(%.mm.chan).key
if (k isin %.mm.mode) .timer923 1 8 _chkkey %.mm.chan
}